package cn.e4j.modular.crm.service.impl;

import cn.e4j.core.dto.impl.Dto;
import cn.e4j.modular.crm.entity.MmrnT;
import cn.e4j.modular.crm.mapper.MmrnTMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author miaoyl
 * @since 2019-04-09
 */
@Service
public class MmrnTServiceImpl extends ServiceImpl<MmrnTMapper, MmrnT> {
    @Transactional(readOnly = true)
    public Integer getMmrnCount(Dto dto) {
        QueryWrapper<MmrnT> mmrnTQueryWrapper = new QueryWrapper<>();
        mmrnTQueryWrapper.eq("MMRNENT",dto.getString("ENT"));
        mmrnTQueryWrapper.eq("MMRNDOCNO",dto.getString("MMRFDOCNO"));
        Integer i = this.baseMapper.selectCount(mmrnTQueryWrapper);
        return i;
    }
}
